package com.request;

import java.io.FileInputStream;
import java.util.Properties;
import java.util.Random;

public class ClientDetails {
	private Properties properties = null;

	private Random random = null;

	private String nodeName = null;

	private String[] clientDetails = new String[2];

	private FileInputStream fileInputStream = null;
	public ClientDetails()
	{
		random=new Random();
	}
	public String[] ClientConfig() {
		try {
			properties = new Properties();
			fileInputStream = new FileInputStream("system.properties");
			properties.load(fileInputStream);
			clientDetails[0] = properties.getProperty("clientport").toString();
			clientDetails[1] = properties.getProperty("clientsystem")
					.toString();
		} catch (Exception e) {
			e.printStackTrace();
		}

		return clientDetails;
	}

	public String Rand() {
		nodeName = "NOD" + String.valueOf(random.nextInt(10))
				+ String.valueOf(random.nextInt(10))
				+ String.valueOf(random.nextInt(10));
		return nodeName;
	}
}
